
package com.joysuch.wwyt.datadump.biz.model;

import java.util.Date;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.zlg.common.datadump.annotation.DataDumpEntity;
import cn.zlg.common.datadump.annotation.DataDumpField;
import com.joysuch.wwyt.bp.entity.dsl.QBpStorageTank;
import com.joysuch.wwyt.bp.entity.dsl.QBpStorageTankArea;
import com.joysuch.wwyt.datadump.biz.convertor.ExportFindStorageTankBindMonitorPoints;
import com.joysuch.wwyt.datadump.biz.convertor.ExportYesNoConvertor;
import com.joysuch.wwyt.datadump.biz.query.BpStorageTankDumpQueryBean;
import com.joysuch.wwyt.mh.entity.dsl.QMhMajorHazard;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

@DataDumpEntity(name = "bp-storage-tank-dump", entity = QBpStorageTank.class, exportQueryConditions = BpStorageTankDumpQueryBean.class, businessName = "储罐")
@Data
public class BpStorageTankDumpBean {

    @Excel(name = "编号", width = 20)
    @DataDumpField(field = "uniCode", importKey = true)
    @Length(max = 64)
    private String uniCode;

    @Excel(name = "储罐名称", width = 20)
    @DataDumpField(field = "name")
    private String name;

    // useJoin=true, 联合查询，可以应用storage tank area的数据权限，过滤没有权限的数据
    @Excel(name = "所属罐区名称", width = 20)
    @DataDumpField(field = "bpStorageTankArea", referenceEntity = QBpStorageTankArea.class, referenceEntityField = "name", useJoin = true)
    private String belongGroupName;

    @Excel(name = "所属罐区编号", width = 20)
    @DataDumpField(field = "bpStorageTankArea", referenceEntity = QBpStorageTankArea.class, referenceEntityField = "code", useJoin = true)
    private String belongGroupCode;

    @Excel(name = "储罐容积m³", width = 20)
    @DataDumpField(field = "volume")
    private Float volume;

    @Excel(name = "储罐形式", width = 20)
    @DataDumpField(field = "type")
    private String type;

    @Excel(name = "储罐结构", width = 20)
    @DataDumpField(field = "arch")
    private String arch;

    @Excel(name = "储罐材质", width = 20)
    @DataDumpField(field = "material")
    private String material;

    @Excel(name = "储罐位置分类", width = 20)
    @DataDumpField(field = "locationCategory")
    private String locationCategory;

    @Excel(name = "是否为压力容器", width = 20)
    @DataDumpField(field = "isPressureContainer", exportConvertors = ExportYesNoConvertor.class)
    private String isPressureContainer;

    @Excel(name = "压力等级", width = 20)
    @DataDumpField(field = "pressureLevel")
    private String pressureLevel;

    @Excel(name = "是否高危储罐", width = 20)
    @DataDumpField(field = "isDangerousTank", exportConvertors = ExportYesNoConvertor.class)
    private String isDangerousTank;

    @Excel(name = "是否设置自动喷淋", width = 20)
    @DataDumpField(field = "isSetAutomaticSpray", exportConvertors = ExportYesNoConvertor.class)
    private String isSetAutomaticSpray;

    @Excel(name = "是否构成高危储罐", width = 20)
    @DataDumpField(field = "isFormDangerousTank", exportConvertors = ExportYesNoConvertor.class)
    private String isFormDangerousTank;

    @Excel(name = "有无围堰", width = 20)
    @DataDumpField(field = "hasCofferdam", exportConvertors = ExportYesNoConvertor.class)
    private String hasCofferdam;

    @Excel(name = "围堰所围面积㎡", width = 20)
    @DataDumpField(field = "cofferdamArea")
    private Float cofferdamArea;

    @Excel(name = "进出料方式", width = 20)
    @DataDumpField(field = "inOutMethod")
    private String inOutMethod;

    @Excel(name = "安全设备", width = 20)
    @DataDumpField(field = "safeDevice")
    private String safeDevice;

    @Excel(name = "是否配套火炬", width = 20)
    @DataDumpField(field = "isProvideTorch", exportConvertors = ExportYesNoConvertor.class)
    private String isProvideTorch;

    @Excel(name = "是否设置保温/保冷", width = 20)
    @DataDumpField(field = "isProvideHeatPreservation", exportConvertors = ExportYesNoConvertor.class)
    private String isProvideHeatPreservation;

    @Excel(name = "是否设置消防水炮/泡沫炮", width = 20)
    @DataDumpField(field = "isProvideFireWaterMonitor", exportConvertors = ExportYesNoConvertor.class)
    private String isProvideFireWaterMonitor;

    @Excel(name = "投产日期", width = 20, format = "yyyy-MM-dd")
    @DataDumpField(field = "commissioningDate")
    private Date commissioningDate;

    @Excel(name = "设计储量m³", width = 20)
    @DataDumpField(field = "designStorageVolume")
    private Float designStorageVolume;

    @Excel(name = "设计压力kpa", width = 20)
    @DataDumpField(field = "designPressure")
    private Float designPressure;

    @Excel(name = "工作温度区间（下）℃", width = 20)
    @DataDumpField(field = "workTemperatureLowValue")
    private Float workTemperatureLowValue;

    @Excel(name = "工作温度区间（上）℃", width = 20)
    @DataDumpField(field = "workTemperatureHighValue")
    private Float workTemperatureHighValue;

    @Excel(name = "工作压力区间（下）kpa", width = 20)
    @DataDumpField(field = "workPressureLowValue")
    private Float workPressureLowValue;

    @Excel(name = "工作压力区间（上）kpa", width = 20)
    @DataDumpField(field = "workPressureHighValue")
    private Float workPressureHighValue;

    @Excel(name = "设计液位高度cm", width = 20)
    @DataDumpField(field = "designLiquidLevel")
    private Float designLiquidLevel;

    @Excel(name = "液位计类型", width = 20)
    @DataDumpField(field = "liquidometerType")
    private String liquidometerType;

    @Excel(name = "关联的监测点", width = 20)
    @DataDumpField(field = "id", exportConvertors = ExportFindStorageTankBindMonitorPoints.class)
    private String bindedMonitorPointCodes;

    @Excel(name = "所属重大危险源", width = 20)
    @DataDumpField(field = "mhMajorHazard.id", referenceEntity = QMhMajorHazard.class, referenceEntityField = "name")
    private String majorHazardName;

    @Excel(name = "所属重大危险源编号", width = 20)
    @DataDumpField(field = "mhMajorHazard.id", referenceEntity = QMhMajorHazard.class, referenceEntityField = "code")
    private String majorHazardCode;

}
